33e7b484acb9b0cda2e638dd5356b5e33c0ec1b4,sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java,BatchReportReader,readComponent,#number#,48
Before Change
@CheckForNull
public BatchReport.Component readComponent(int componentRef) {
File file = fileStructure.fileFor(FileStructure.Domain.COMPONENT, componentRef);
if (file.exists() && file.isFile()) {
return ProtobufUtil.readFile(file, BatchReport.Component.PARSER);
}
return null;
}
public List<BatchReport.Issue> readComponentIssues(int componentRef) {
After Change
public BatchReport.Component readComponent(int componentRef) {
File file = fileStructure.fileFor(FileStructure.Domain.COMPONENT, componentRef);
if (!file.exists() || !file.isFile()) {
throw new IllegalStateException("Unable to find report for component #" + componentRef + ". File does not exist: " + file);
}
return ProtobufUtil.readFile(file, BatchReport.Component.PARSER);